<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="../css/style.css" />
		<link rel="stylesheet" href="../css/iconfont.css " />
		<link href="../css/calendar/calendar.css" rel="stylesheet"/>
	</head>
	<body>
		<header class="mui-bar mui-bar-nav ding-bar">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title">电梯管理</h1>
		</header>
		<div class="mui-content">
		    <div id="gerenzhongxin">
		        <div class="gl-gr-banner">
		        	<div class="gl-tx" id="touxiang">
		        		
		        	</div>
		        	<h1 class="gl-gr-name" id="nicheng"></h1>
		        	<p class="gl-gr-name gl-gr-phone" id="shoujihao"></p>
		        </div>
		        <div class="mokuai geren-qk" style="margin-top: 0.3rem;">
		        	<h1 class="kao-t">本月考勤情况</h1>
		        	<ul class="geren-ul" id="kao-ul">
		        		<!--<li  >
		        			<span class="yi">23</span>
		        			<span>迟到次数</span>
		        		</li>
		        		<li  >
		        			<span class="er">0</span>
		        			<span>早退次数</span>
		        		</li>
		        		<li  >
		        			<span class="san">0</span>
		        			<span>矿工次数</span>
		        		</li>
		        		-->
		        	</ul>
		        </div>
		        <div class="mokuai geren-qk">
		        	<h1 class="qing-t">本月工单完成情况</h1>
		        	<ul  class="geren-ul" id="qing-ul">
		        		<!--<li >
		        			<span class="yi">0</span>
		        			<span>本周迟到次数</span>
		        		</li>
		        		<li >
		        			<span class="er">0</span>
		        			<span>本月迟到次数</span>
		        		</li>
		        		<li >
		        			<span class="san">0</span>
		        			<span>当年迟到次数</span>
		        		</li>
		        		-->
		        	</ul>
		        </div>
		    </div>
		    <footer>
				
		    	<nav class="mui-bar mui-bar-tab guanli-footer">
		    		<a class="mui-tab-item mui-active" >
		    			<span class="mui-icon  iconfont icon-gongzuoshi" id="gongzuo"></span>
		    			<span class="mui-tab-label ">工作</span>
		    		</a>
		    		<a class="mui-tab-item " data-href="tongzhi.html">
		    			<span class="mui-icon iconfont icon-tongzhi"></span>
		    			<span class="mui-tab-label">通知</span>
		    		</a>
		    		<a class="mui-tab-item" data-href="gerenzhongxin.html">
		    			<span class="mui-icon iconfont icon-Personal-active"></span>
		    			<span class="mui-tab-label">我的</span>
		    		</a>
		    	</nav>
		    </footer>
		</div>
		<script src="../js/jquery-1.8.0.min.js"></script>
		<script src="../js/mui.min.js"></script>
		<script type="text/javascript" src="../js/head_public.js" ></script>
		<script type="text/javascript" src="../js/common.js" ></script>
		<script type="text/javascript" src="../js/session.js" ></script>
		<script type="text/javascript" src="../css/calendar/calendar.js" charset="utf-8"></script>
		<script type="text/javascript">
             var work_id=getCookie("workid");
             var work=getCookie("work");
             var userid=getCookie("userid");
             // $("footer").load("footer3.html")
			$(".mui-content").on("tap","a[data-href]",function(){
				location.href=$(this).attr("data-href");
//				mui.openWindow({url:$(this).attr("data-href")})
			})
             if(userid==""||userid==null){
             	alert("您还没有登录，请先登录")
             	location.href="../public/login.html";
             }else{
             	var param={};
             	param.work_id=work_id;
             	param.member_id=userid;
             	param.member_work=work; 
             	$(".mui-content").on("tap","#gongzuo",function(){
             		if(work=="1"){
             			location.href="guanliindex.html"
//           			mui.openWindow({url:"guanliindex.html"})
             		}else if(work=="2"){
             			location.href="index.html"
//           			mui.openWindow({url:"index.html"})
             		}else{
             			location.href="../public/index.html"
//           			mui.openWindow({url:"../public/index.html"})
             		}
					
				})
             	if(work=="1"){
             		$.post(net+"/public/index.php?s=api/elevator/manage_index",param,function(res){
	             	   if(res.code=="200"){
	             	   	 var str1='<li><span class="yi">'+res.result.chidao+'</span><span>迟到次数</span></li><li><span class="er">'+res.result.zaotui+'</span><span>早退次数</span></li><li><span class="san">'+res.result.signnum+'</span><span>矿工次数</span></li>'
                    	 var str2='<li ><span class="yi">'+res.result.c_num+'</span><span>巡查次数</span></li><li ><span class="er">'+res.result.p_num+'</span><span>派单次数</span></li><li ><span class="san">'+res.result.q_num+'</span><span>确认次数</span></li>' 
	             	   	 $("#qing-ul").html(str2)
	             	   	 $("#kao-ul").html(str1)
	             	   }
	             	})
             	}else if(work=="2"){
             		
             		$.post(net+"/public/index.php?s=api/elevator/member_index",param,function(res){
	             	   if(res.code=="200"){
	             	   	 var str1='<li><span class="yi">'+res.result.chidao+'</span><span>迟到次数</span></li><li><span class="er">'+res.result.zaotui+'</span><span>早退次数</span></li><li><span class="san">'+res.result.signnum+'</span><span>矿工次数</span></li>'
	             	   	 var str2='<li ><span class="yi">'+res.result.b_num+'</span><span>维修次数</span></li><li ><span class="er">'+res.result.bn_time+'</span><span>超期次数</span></li><li ><span class="san">'+res.result.s_num+'</span><span>保养次数</span></li>' 
	             	   	 $("#qing-ul").html(str2)
	             	   	 $("#kao-ul").html(str1)
	             	   }
	             	})
             	}
             	$.post(net+"public/index.php?s=api/member",{"member_id":userid},function(res){
             	   	if(res.code=="200"){
             	   		if(res.result.member_avatar!=null&&res.result.member_avatar!=""){
             	   			$("#touxiang").html('<div></div><img src="'+net+res.result.member_avatar+'"  />')
             	   		}
	            		$("#shoujihao").html(res.result.member_mobile)
	            		if(res.result.member_username!=""&&res.result.member_username!=null){
	            			$("#nicheng").html(res.result.member_username)
	            		}
		            }
             	   
             	})
             }
		</script>
	</body>

</html>